#include "PersistentFramework.h"
#include "EmployeeInfo.h"
#include <stdio.h>

int PersistentFramework_Save()
{
	FILE *fptr;
	fptr = fopen(ENTITY_EMPLOYEEINFO,"w");
	if(fptr == NULL)
	{
		return 0;
	}
	fwrite(&pObject,sizeof(struct PersistentObject),1,fptr);
	fclose(fptr);
	return 1;
}

int PersistentFramework_Load()
{
	FILE *fptr;
	fptr = fopen(ENTITY_EMPLOYEEINFO,"r");
	if(fptr == NULL)
	{
		return 0;
	}
	fread(&pObject,sizeof(struct PersistentObject),1,fptr);
	fclose(fptr);
	return 1;
}